1. Field of the Invention
In general, the present invention provides a MPEG-2 decoder, method and buffer scheme for providing enhanced trick mode playback of a video stream. Specifically, the present invention utilizes at least two memory buffers to decode I frames and P frames at a rate faster than a single frame time to provide the enhanced fast forward playback (or rewind) of the video stream.
2. Related Art
The Moving Picture Experts' Group (MPEG) MPEG-2 standard is a well known compression/decompression standard for video applications. In general, this standard describes an encoded and compressed data stream that has substantial bandwidth reduction. The compression of the data stream is a subjective loss compression followed by a lossless compression. The encoded, compressed digital video data is subsequently decompressed and decoded in an MPEG-2 Standard compliant decoder. To this extent, the MPEG-2 Standard further is described in, e.g., C. A. Gonzales and E. Viscito, “Motion Video Adaptive Quantization In The Transform Domain,” IEEE Trans. Circuits System Video Technology, Volume 1, No. 4, December 1991, pp. 374-378, E. Viscito and C. A. Gonzales, “Encoding of Motion Video Sequences for the MPEG Environment Using Arithmetic Coding,” SPIE, Vol. 1360, pp. 1572-1576, (1990), D. LeGall, “MPEG: A Video Compression Standard for Multimedia Applications,” Communications of the ACM, Vol. 34, No. 4, (April 1991), pp. 46-58, S. Purcell and D. Galbi, “C Cube MPEG Video Processor,” SPIE, v. 1659, (1992) pp. 24-29, and D. J. LeGall, “MPEG Video Compression Algorithm,” Signal Process Image Commun., v. 4, n. 2, (1992), pp. 129-140, among others.
Under the MPEG-2 standard, temporal redundancy reduction is provided through the use of various predictive and interpolative tools. Typically, three types of frames or pictures, “I” Intrapictures, “P” Predicted Pictures, and “B” Bidirectional Interpolated Pictures are provided. Motion compensation goes to the redundancy between pictures. The formation of “P” frames from “I” frames, and of “B” frames from a pair of past and future pictures is a key feature of the MPEG-2 Standard technique. Specifically, the “I” frames provide moderate compression, and are access points for random access of the stream (e.g., in the case of video tapes or CD ROMS). As a matter of convenience, one “I” frame can be provided at varying intervals (e.g., every half second or every ten to twenty pictures). The “I” frame only gets information from itself and does not receive information from an “P” frame or “B” frame. Thus, scene cuts preferably occur at “I” frames. “P” frames are coded with respect to a previous frame and are used as the reference for future frames, both “P” and “B” frames. Still yet, “B” frames have the highest degree of compression. However, they require both a past picture and a future frame for reconstruction and are never used as a reference.
In general, the decode engine of an MPEG-2 decoder is designed to operate in a minimal amount of memory, typically using two megabytes for a main profile level MPEG-2 video stream. This is accomplished using a three buffer scheme, in which two frame buffers are used to collect the uncompressed reference frames (“I” and “P” frames), while a third buffer is used to collect the uncompressed bi-directional (“B”) frame. The reference frame buffers are decoded in their entirety prior to a display process that reads out the contents of the buffers in raster scan order. Conversely, the “B” frame buffer is shared simultaneously between the display process and the decode process. The minimum amount of memory usage is established by how efficiently the decoder can manage the overlap of data in the “B” frame buffer to accomplish the concurrent decode/display functions in one memory space. One such method is shown and described in U.S. Pat. No. 5,668,599, which is herein incorporated by reference.
For normal playback, memory management generally requires that the decoding of the individual frames be paced according to the rate at which they are displayed, otherwise more memory will be required to buffer additional frames or portions of video frames. To this extent, a frame synchronization signal is used to mark the start of another frame or field interval to establish a point in time for continuing with the next frame to decode. The synchronization signal is also used to establish whether there should be any adjustments to the video decoding to compensate for falling behind or ahead of the presentation time stamp.
Although extremely popular and useful, the MPEG-2 standard fails to provide an optimal method for trick mode playback (e.g., fast forward or rewind playback). For example, in the case of a DVD, if a user selects to fast forward (scan) a movie, a great amount of discontinuity and distortion will be present. Such noise is often significantly greater than the user would observe when fast forwarding for example, a VHS movie. In many instances, a great amount of motion discontinuity will be present. Such discontinuity is often significantly more objectionable then the user would observe when fast forwarding for example, a VHS movie. In general, the discontinuity is caused by the fact that a typical MPEG-2 implementation will only decode “I” frames to a single buffer during fast forward playback. Accordingly, only a small amount of the video data is decoded and displayed. In addition, since the frequency at which an “I” frame exists within a group of pictures (GOP) can vary from video source to video source, no consistency in fast forward playback is provided. Still yet, because the decoding operation is paced by a frame synchronization signal, the rate at which decoding and display can occur is limited to a single frame time (e.g., 33 milliseconds) or greater. Even if an implementation were to decode both “I” and “P” frames to multiple buffers, the decoding and display operations would still be limited by the frame synchronization signal.
In view of the foregoing, there exists a need for an MPEG-2 decoder, method and buffer scheme for providing enhanced trick (e.g., fast forward, rewind, etc.) playback of a video stream. To this extent, a need exists for an implementation that provides smoother trick mode playback as well as increased decoding speed.